package aryn.framework.examples.display;

import aryn.framework.display.MyCanvas;
import aryn.framework.display.MyCanvasLogic;
import aryn.framework.display.MyMouseInfo;

public class Logic implements MyCanvasLogic {

	private long stringId; 
	MyCanvas canvas;
	MyMouseInfo mouse;
	
	public Logic(MyCanvas canvas) {
		this.canvas = canvas;
		this.mouse = canvas.getMouseInfo();
		this.stringId = canvas.addString("Mouse: "+mouse.getMouseX() + ","+mouse.getMouseY(), 0, 40);
	}
	
	@Override
	public void update(double dt) {
		canvas.setString(stringId, "Mouse: "+mouse.getMouseX() + ","+mouse.getMouseY());
	}
}
